package JavaBase;
/*
*以(OO)面向对象的思想，编写自定义类描述程序员(Programmer)。
*设定属性包括：姓名(name)、年龄(age)、技术方向(skillDir)、工作年限(jobOfYears)；
*方法包括：输出IT从业者信息。
 */
public class Programmer {
    private String name;
    private int age;
    private String skillDir;
    private int jobOfYears;

    public Programmer()
    {
        this.name="无名";
        this.age=23;
        this.skillDir="未知";
        this.jobOfYears=5;
    }
    public Programmer(String name,int age,String skillDir,int jobOfYears)
    {
        this.age=age;
        this.name=name;
        this.jobOfYears=jobOfYears;
        this.skillDir=skillDir;
    }
    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getJobOfYears() {
        return jobOfYears;
    }

    public void setJobOfYears(int jobOfYears) {
        this.jobOfYears = jobOfYears;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSkillDir() {
        return skillDir;
    }

    public void setSkillDir(String skillDir) {
        this.skillDir = skillDir;
    }
    public void showProgrammer()
    {
        System.out.println("***程序员介绍***");
        System.out.println("姓名："+this.name);
        System.out.println("年龄："+this.age);
        System.out.println("技术方向："+this.skillDir);
        System.out.println("工作年限："+this.jobOfYears);
    }

}
